# import animal_demo
from animal_demo import Animal

Animal.eat()
# cat = animal_demo.Animal("katti","橘色","雌","橘猫")
cat = Animal("katti","橘色","雌","橘猫")
cat.to_String()
# animal_demo.Animal.to_String()
print(cat.type)
# print(animal_demo.Animal.type)
print(Animal.type)  # 类变量不仅可以使用对象名去访问，还可以使用类名去访问
print(cat.ethnic)
# print(Animal.ethnic)  # 实例变量不能使用类名去访问，只能通过对象名去访问

Animal.s1 = "111111"
print(Animal.s1)

# print(Animal.ethnic)
print(cat.ethnic)

Animal.eat()
cat.eat()

Animal.sleep()
cat.sleep()